package com.wangxiaonan.wrapper.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: wangxiaonan
 * @Date: 2019/3/28
 **/
@Controller
public class WrapperController {

    @RequestMapping(value = {"/", "/index", "/wrapper"}, method = RequestMethod.GET)
    public String wrapper(@RequestParam(value = "num", defaultValue = "0") String num, Model model) {
        model.addAttribute("num", num);
        return "/wrapper";
    }
}
